HttpClientBuilder

class HttpClientBuilder

A builder for http client configuration.

Functions

addHeader
Link copied to clipboard
fun addHeader(name: String, value: String)
Add a default header, adding it to the existing header after a , if a this header has already been set.
basicAuth
Link copied to clipboard
fun basicAuth(username: String, password: String)
Add a basic authentication header.
bearerAuth
Link copied to clipboard
fun bearerAuth(token: String)
Add a bearer authentication header.
handler
Link copied to clipboard
fun handler(handler: RequestHandler)
Add a request handler.
header
Link copied to clipboard
fun header(name: String, value: String)
Set a default header.
headers
Link copied to clipboard
fun headers(builder: HeaderProvider)
Add default headers.
inline fun headers(builder: MutableHeaders.() -> Unit)
Add default headers.

Properties

allowRedirectDowngrade
Link copied to clipboard
var allowRedirectDowngrade: Boolean? = null
allowRedirects
Link copied to clipboard
var allowRedirects: Boolean? = null
allowRetries
Link copied to clipboard
var allowRetries: Boolean? = null
defaultHeaders
Link copied to clipboard
val defaultHeaders: MutableHeaders
The headers added to every request.
deserializeDates
Link copied to clipboard
var deserializeDates: Boolean? = null
ignoreSslError
Link copied to clipboard
var ignoreSslError: Boolean? = null
keepAlive
Link copied to clipboard
var keepAlive: Boolean? = null
maxRedirects
Link copied to clipboard
var maxRedirects: Int? = null
maxRetries
Link copied to clipboard
var maxRetries: Int? = null
maxSockets
Link copied to clipboard
var maxSockets: Int? = null
socketTimeout
Link copied to clipboard
var socketTimeout: Int? = null
userAgent
Link copied to clipboard
var userAgent: String? = null

Sources

js source
Link copied to clipboard